#!/usr/bin/node

const log = console.log,
      usr = process.argv[2],
      pwd = process.argv[3],
      argv = process.argv;

if(usr == undefined || pwd == undefined){
  log('must have usr and pwd');
  process.exit(1);
}

if(argv.length > 4){
  log('only need usr and pwd');
  process.exit(2);
}

log(`usr: ${usr}`);
log(`pwd: ${pwd}\n`);

let buf =new Buffer(`${usr}:${pwd}`);
log(`base64: ${buf.toString('base64')}`);

